package tool

import (
	"gin-sns/app/ginframe/router"
	"gin-sns/app/service/middleware/auth"
)

//加载路由
func init() {
	// 服务监控
	g1 := router.New("admin", "/tool", auth.Auth)
	g1.GET("/build", "tool:build:view", ToolController.Build)
	g1.GET("/swagger", "tool:swagger:view", ToolController.Swagger)
	g1.GET("/gen", "tool:gen:view", GenController.Gen)
	g1.POST("/gen/list", "tool:gen:list", GenController.GenList)
	g1.POST("/gen/remove", "tool:gen:remove", GenController.Remove)
	g1.GET("/gen/importTable", "tool:gen:list", GenController.ImportTable)
	g1.POST("/gen/db/list", "tool:gen:list", GenController.DataList)
	g1.POST("/gen/importTable", "tool:gen:list", GenController.ImportTableSave)
	g1.GET("/gen/edit", "tool:gen:edit", GenController.Edit)
	g1.POST("/gen/edit", "tool:gen:edit", GenController.EditSave)
	g1.POST("/gen/column/list", "tool:gen:list", GenController.ColumnList)
	g1.GET("/gen/preview", "tool:gen:preview", GenController.Preview)
	g1.GET("/gen/genCode", "tool:gen:code", GenController.GenCode)
}
